import { createRouter, createWebHistory } from 'vue-router'
import WebsiteList from '../views/WebsiteList.vue'
import AdminLogin from '../views/AdminLogin.vue'
import AdminEdit from '../views/AdminEdit.vue'

const routes = [
  {
    path: '/',
    name: 'WebsiteList',
    component: WebsiteList
  },
  {
    path: '/admin/login',
    name: 'AdminLogin',
    component: AdminLogin
  },
  {
    path: '/admin/edit/:id',
    name: 'AdminEdit',
    component: AdminEdit,
    props: true
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router